<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css clear</title>

    <style type="text/css">

        .div1 {
            background-color: red;
            height: 200px;
            width: 200px;
            float: right;
            clear: both;
        }

        .div2 {
            background-color: red;
            height: 200px;
            width: 200px;
        }

        .img1 {
            float: right;
        }

    </style>
</head>
<body>

    <div class="div1">
        paragraphs
        <img class="img1" src="../../img/eg_logo_w3school.gif">
    </div>
    <br >
    <br>
    <hr>

    <div class="div2">
        paragraphs
        <img class="img2" src="../../img/eg_logo_w3school.gif">
    </div>
</body>
</html>